# urls.py
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import TPAViewSet

router = DefaultRouter()
router.register(r'', TPAViewSet, basename='')

urlpatterns = [
    path('api/', include(router.urls)),
    # 手动添加自定义动作的路由
    path('api/get_data_by_id/', TPAViewSet.as_view({'get': 'get_data_by_id'}), name='get-data-by-id'),
    # 手动为 delete_view 添加 URL 模式
    path('api/delete/', TPAViewSet.as_view({'delete': 'delete_view'}), name='tpa-delete'),
]